'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace Shell

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.Shell.IActiveDesktop)> _
    Public Interface IActiveDesktop
        <PreserveSig()> Function AddDesktopItem(ByVal pcomp As Component, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function AddDesktopItemWithUI(ByVal hwnd As IntPtr, ByVal pcomp As Component, ByVal dwFlags As DTI_ADTIWUI) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function AddUrl(ByVal hwnd As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal pszSource As String, ByVal pcomp As Component, ByVal dwFlags As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GenerateDesktopItemHtml(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwszFileName As String, ByVal pcomp As Component, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDesktopItem(ByVal nComponent As Integer, <Out()> ByRef pcomp As Component, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDesktopItemByID(ByVal dwID As IntPtr, <Out()> ByRef pcomp As Component, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDesktopItemBySource(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwszFileName As String, <Out()> ByRef pcomp As Component, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDesktopItemCount(<Out()> ByRef lpiCount As Integer, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDesktopItemOptions(<Out()> ByRef pco As ComponentsOpt, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetPattern(<MarshalAs(UnmanagedType.LPWStr), Out()> ByRef pwszPattern As String, ByVal cchPattern As UInteger, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetWallpaper(<MarshalAs(UnmanagedType.LPWStr), Out()> ByRef pwszWallpaper As String, ByVal cchWallpaper As UInteger, ByVal dwFlags As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetWallpaperOptions(<Out()> ByRef pwpo As WallpaperOpt, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ModifyDesktopItem(ByRef pcomp As Component, ByVal dwflags As CompElem) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function RemoveDesktopItem(ByRef pcomp As Component, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetDesktopItemOptions(ByVal pcomp As ComponentsOpt, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetPattern(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwszPattern As String, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetWallpaper(<MarshalAs(UnmanagedType.LPWStr)> ByVal pwszWallpaper As String, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetWallpaperOptions(ByVal pwpo As WallpaperOpt, ByVal dwReserved As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace